@import '~@/uni_modules/lime-style/index.scss';

$badge-size: create-var(badge-size , 32rpx);
$badge-color: create-var(badge-color , white);
$badge-padding: create-var(badge-padding, 0 8rpx);
$badge-font-size: create-var(badge-font-size, 12px);
$badge-font-weight: create-var(badge-font-weight, bold);
$badge-border-width: create-var(badge-border-width, 1rpx);
$badge-border-color: create-var(badge-border-color, white);
$badge-background: create-var(badge-background, $error-color);
$badge-dot-color: create-var(badge-dot-color, $error-color);
$badge-dot-size: create-var(badge-dot-size, 16rpx);
$badge-font: create-var(badge-font, -apple-system-font, helvetica neue, arial, sans-serif);
$badge-border-radius: create-var(badge-border-radius, 999px);



.l-badge {
  /* #ifndef UNI-APP-X */
  display: inline-block;
  /* #endif */ 
  box-sizing: border-box;
  /* #ifndef APP-ANDROID || APP-IOS || APP-HARMONY */
  min-width: $badge-size;
   /* #endif */ 
  padding: $badge-padding;
  color: $badge-color;
  font-weight: $badge-font-weight;
  font-size: $badge-font-size;
  font-family: $badge-font;
  line-height: 1.2;
  text-align: center;
  background-color: $badge-background;
  border: $badge-border-width solid $badge-border-color;
  border-radius: $badge-border-radius;
  overflow: visible;
  // width: 100px;
  // white-space: nowrap;
  &--fixed {
    position: absolute;
    transform-origin: 100%;
  }
  &--fixed#{&}--offscreen {
	position: fixed;
	/* #ifdef APP-IOS */ 
	opacity: 0.13;
	/* #endif */ 
	/* #ifndef APP-IOS */
	opacity: 0;
	/* #endif */ 
	top: -10000000000px;
	// left: 10000px 
 }
  &--top-left {
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
  }

  &--top-right {
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
  }

  &--bottom-left {
    bottom: 0;
    left: 0;
    transform: translate(-50%, 50%);
  }

  &--bottom-right {
    bottom: 0;
    right: 0;
    transform: translate(50%, 50%);
  }

  &--dot {
    width: $badge-dot-size;
    min-width: 0;
    height: $badge-dot-size;
    background: $badge-dot-color;
    border-radius: 99px;
    // border: none;
	border-width: 0;
    padding: 0;
	overflow: visible;
  }

  &__wrapper {
    position: relative;
	overflow: visible;
	
	/* #ifndef UNI-APP-X */
	display: inline-block;
	/* #endif */
	/* #ifdef UNI-APP-X */
	// align-self: flex-start;
	/* #endif */
  }
}
